/*
 * Candidato.h
 *
 *  Created on: Oct 15, 2011
 *      Author: lore
 */

#ifndef CANDIDATO_H_
#define CANDIDATO_H_
#include <math.h>

#include <vector>
#include <sstream>
#include <stdio.h>
#include <fstream>
#include <iostream>
#include <string.h>
#include <stdlib.h>

using namespace std;

class Candidato {
public:
	Candidato();

	void setIdLista(unsigned long idlista);
	unsigned long getIdLista();

	void setIdVotante(unsigned long idvotante);
	unsigned long getIdVotante();

	void setIdCargo(unsigned long idcargo);
	unsigned long getCargo();

	unsigned long getId();
	unsigned long getUnifiedId(unsigned long idL, unsigned long idC, unsigned long idV);

	//serializacion
	char* pack();
	unsigned long packLen();
	bool unpack(char* buffer, unsigned long bufferLen);
		
	virtual ~Candidato();

private:
		unsigned long idLista;
		unsigned long idVotante;
		unsigned long idCargo;
};

#endif /* CANDIDATO_H_ */
